package com.ly.blog2Common.core.http;

import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;

/**
 * @Description: 加载properties文件
 * @Authur: lyMaster
 * @Date: 2018/12/30 09:34
 */
public class LoadProperties implements ApplicationListener<ApplicationStartedEvent> {

    private String propertyFileName;

    public LoadProperties(String propertyFileName) {
        this.propertyFileName = propertyFileName;
    }

    @Override
    public void onApplicationEvent(ApplicationStartedEvent applicationStartedEvent) {
        ErrConfigInit.loadAllProperties(propertyFileName);
    }
}
